package com.fg.estate.service.impl;

import com.fg.estate.bean.Permission;
import com.fg.estate.mapper.PermissionMapper;
import com.fg.estate.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 丰哥
 * 2022/10/10
 * 权限业务层实现
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public List<Permission> selectAll() throws Exception {
        return permissionMapper.selectAll();
    }

    @Override
    public void insert(Permission permission) throws Exception {
        permissionMapper.insert(permission);
    }

    @Override
    public void deleteById(long id) throws Exception {
        permissionMapper.deleteById(id);
    }

    @Override
    public Permission selectById(long id) throws Exception {
        return permissionMapper.selectById(id);
    }

    @Override
    public void update(Permission permission) throws Exception {
        permissionMapper.update(permission);
    }
}
